/*******************************************************************************
 * FilePath    : \Software\Examples\MS1656_app_adv\Inc\mgSPI.h
 * Version     : 1.0
 * Brief       : 
 * Author      : AndrewHu
 * Company     : Shanghai MacroGiga Electronics CO.,Ltd
 * Email       : Hubinbo@macrogiga.com
 * Date        : 2020-03-24 15:56:39
 * LastEditors : AndrewHu
 * LastEditTime: 2020-03-25 14:23:23
 * Description : 
 ******************************************************************************/
#ifndef __MG_SPI_H__
#define __MG_SPI_H__
/* Includes ------------------------------------------------------------------*/
#include <Includes.h>
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* Private function ----------------------------------------------------------*/
/* extern --------------------------------------------------------------------*/

/*******************************************************************************
 * Function    : SPI_WriteReg
 * Brief       : 
 * Parameter   : 
 * Returns     : 
 * Date        : 2020-03-25 10:50:35
 * Description : 
 ******************************************************************************/
void SPI_WriteReg(unsigned char reg, unsigned char data);
/*******************************************************************************
 * Function    : SPI_ReadReg
 * Brief       : 
 * Parameter   : 
 * Returns     : 
 * Date        : 2020-03-25 10:50:35
 * Description : 
 ******************************************************************************/
void SPI_ReadReg(unsigned char reg, unsigned char *data);
/*******************************************************************************
 * Function    : SPI_WriteBuf
 * Brief       : 
 * Parameter   : 
 * Returns     : 
 * Date        : 2020-03-24 17:06:23
 * Description : 
 ******************************************************************************/
unsigned char SPI_WriteBuf(unsigned char reg, unsigned char const *pBuf, unsigned char len);
/*******************************************************************************
 * Function    : SPI_ReadBuf
 * Brief       : 
 * Parameter   : 
 * Returns     : 
 * Date        : 2020-03-24 17:10:09
 * Description : 
 ******************************************************************************/
unsigned char SPI_ReadBuf(unsigned char reg, unsigned char *pBuf, unsigned char len);
/*******************************************************************************
 * Function    : SPIM_Init
 * Brief       : 
 * Parameter   : 
 * Returns     : 
 * Date        : 2020-03-24 16:57:25
 * Description : 
 ******************************************************************************/
void SPIM_Init(void);
#endif
